package jpademo.repository;

import java.util.List;

import jpademo.model.Student;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Component;
@Component
public interface StudentRepository extends Repository<Student, Long>
{
    @Query(value = "from Student s where s.name=:name")
    List<Student> findByName(@Param("name") String name);
    
    List<Student> findByNameAndScore(String name, float score);
}